"""
正则表达式练习
"""
import re

# 匹配出大写字母开头的单词
result = re.findall('[A-Z][a-z]*',"How are you Jame.")
print(result)

# 匹配出所有数字
result1 = re.findall('[0-9]+',"2025-05-18")
print(result1)


result2 = re.findall('-?[0-9]+',"-18度，23岁，小明2岁")
print(result2)

#匹配手机号码
result3 = re.findall('[0-9]{11}',"王总：15840665987")
print(result3)

#匹配QQ号码
result5 = re.findall('[1-9][0-9]{5,10}',"王总QQ:125664458")
print(result5)

